// 商品详情页公共样式

.detail-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #f5f5f5;
}

.content-scroll {
  flex: 1;
  padding-bottom: 160rpx; // 预留底部按钮空间（120rpx + 40rpx余量）
}

.product-main-image {
  width: 100%;
}

.product-info-card,
.spec-card {
  background-color: #fff;
  border-radius: 20rpx;
  margin: 20rpx;
  padding: 30rpx;
}

.product-name {
  font-size: 40rpx;
  font-weight: bold;
}

.product-desc {
  font-size: 26rpx;
  color: #999;
  margin-top: 10rpx;
  line-height: 1.6;
}

.product-price {
  font-size: 44rpx;
  color: #c7000b;
  font-weight: bold;
  margin-top: 20rpx;
}

.spec-tip {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  font-size: 24rpx;
  padding: 16rpx 20rpx;
  border-radius: 10rpx;
  margin-bottom: 30rpx;
  line-height: 1.6;
  border-left: 4rpx solid #ffa726;
}

.spec-group {
  margin-bottom: 40rpx;
  &:last-child {
    margin-bottom: 0;
  }
  
  .spec-group-header {
    margin-bottom: 20rpx;
  }
  
  .spec-group-name {
    font-size: 28rpx;
    font-weight: bold;
    
    .spec-required {
      color: #c7000b;
      margin-left: 8rpx;
      font-size: 24rpx;
    }
  }
  
  .spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20rpx;
    
    .spec-option {
      background: #f5f5f5;
      color: #333;
      border: 1rpx solid #f5f5f5;
      border-radius: 10rpx;
      padding: 15rpx 30rpx;
      font-size: 26rpx;
      line-height: 1;
      min-width: 120rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8rpx;
      
      .option-name {
        font-size: 26rpx;
      }
      
      .option-price {
        font-size: 22rpx;
        color: #c7000b;
      }
      
      &.active {
        background: #ffebee;
        color: #c7000b;
        border: 1rpx solid #c7000b;
      }
      
      &.disabled {
        background: #fff;
        color: #999;
        border: 2rpx dashed #ffa726; // ✅ 橙色虚线边框，表示"有冲突但可点击"
        position: relative;
        
        .option-name {
          &::after {
            content: '⚠️';
            margin-left: 6rpx;
            font-size: 20rpx;
          }
        }
        
        .option-price {
          color: #999;
        }
        
        &:active {
          background: #fff3e0; // 点击时的反馈
        }
      }
    }
  }
}

.included-products {
  background-color: #fff;
  border-radius: 20rpx;
  margin: 20rpx;
  padding: 30rpx;
  
  .section-title {
    font-size: 32rpx;
    font-weight: bold;
    margin-bottom: 20rpx;
    color: #333;
  }
  
  .product-item {
    display: flex;
    align-items: center;
    padding: 20rpx 0;
    border-bottom: 1rpx solid #f0f0f0;
    
    &:last-child {
      border-bottom: none;
    }
    
    .product-item-img {
      width: 100rpx;
      height: 100rpx;
      border-radius: 10rpx;
      margin-right: 20rpx;
      flex-shrink: 0;
    }
    
    .product-item-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      
      .product-item-name {
        font-size: 28rpx;
        color: #333;
        margin-bottom: 8rpx;
      }
      
      .product-item-amount {
        font-size: 24rpx;
        color: #999;
      }
    }
  }
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120rpx;
  background-color: #fff;
  border-top: 1rpx solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30rpx;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;

  .price-section {
    color: #c7000b;
    font-weight: bold;
    font-size: 28rpx;
    .price-value {
      font-size: 44rpx;
    }
  }
  
  .add-to-cart-btn {
    background-color: #c7000b;
    color: #fff;
    font-size: 32rpx;
    border-radius: 40rpx;
    padding: 20rpx 80rpx;
    line-height: 1;
  }
}

